<template>
	<div class="app-container">
		<!-- 高级查询 -->
		<div class="filter_container">
			<div class="filter_row">
				<el-form v-show="searchVisible" ref="queryForm" :model="queryParams" :inline="true">
					<el-row :gutter="24">
						<!-- @change="handleSelectedWarehouse()" -->
						<el-col :span="6">
							<el-form-item label="选择仓库:">
								<el-select v-model="queryParams.warehouseCode" filterable clearable placeholder="请选择">
									<el-option v-for="item in  options.warehouseCodes" :key="item.id"
										:label="item.warehouserName" :value="item.id">
									</el-option>

								</el-select>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="整车序列号(VIN码):">
								<el-input v-model="vinNos1" placeholder="多个VIN以逗号或空格分隔" type="textarea" clearable />
							</el-form-item>
						</el-col>

					</el-row> <el-row :gutter="24">
						<el-col :span="12">
							<el-form-item>
								<el-button type="cyan" icon="el-icon-search" size="mini"
									@click="handleQuery">搜索</el-button>
								<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
							</el-form-item>
						</el-col></el-row>
				</el-form>
			</div>
		</div>

		<!-- 工具栏 -->
		<el-row :gutter="10" class="mb8">
			<!-- <el-col :span="1.5">

      </el-col> -->
			<!-- <el-col :span="1.5">
        <el-button v-hasPermission="['transport:tViVehicleInsuranceRecord:update']" type="success" icon="el-icon-edit" size="mini" :disabled="isSingle" @click="handleEdit">修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button v-hasPermission="['transport:tViVehicleInsuranceRecord:delete']" type="danger" icon="el-icon-delete" size="mini" :disabled="isMultiple" @click="handleRemove">删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button v-hasPermission="['transport:tViVehicleInsuranceRecord:export']" type="warning" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
      </el-col>
      <right-toolbar :search-visible.sync="searchVisible" @queryTable="handleQuery" /> -->
		</el-row>

		<div class="operation_container">
			<ul>
				<!-- <li><el-button v-waves type="primary"  size="mini" @click="handleExport">导出</el-button></li> -->

				<!-- <li><el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增出库单</el-button></li>
				<li><el-button type="primary" icon="el-icon-plus" size="mini" @click="batch">批量出库</el-button></li>
				<li><el-button type="primary" icon="el-icon-upload2" size="mini"
						@click="openUploadDialog">导入</el-button></li>
				<li>
					<el-button type="primary" icon="el-icon-upload2" size="mini"
						@click="openUploadDialog1">导入承运商</el-button>
				</li> -->
        <li><el-button type="primary" icon="el-icon-plus" size="mini" @click="batch">出库</el-button></li>
			</ul>
		</div>

		<!-- 数据列表 -->
		<el-table v-loading="loading" :data="page.records" highlight-current-row
			@selection-change="handleSelectionChange">
			<el-table-column type="selection" width="55" align="center" />

			<el-table-column label="整车序列号(VIN码)" align="center" prop="itemList[0].vinNo" />
			<el-table-column label="工厂" align="center" prop="itemList[0].customerNo" />
			<el-table-column label="厂区/物流部" align="center" prop="itemList[0].warehouseName" />
			<el-table-column label="物流公司中心库真实停车位" align="center" prop="itemList[0].centerName" />
			<el-table-column label="物流公司真实入库日期" align="center" prop="itemList[0].realDate" />
			<el-table-column label="物流公司外租库仓库名称" align="center" prop="itemList[0].leasingName" />
			<el-table-column label="物流公司外租库真实停车位" align="center" prop="itemList[0].leasingCode" />
			<el-table-column label="溢库短驳外租库真实日期" align="center" prop="itemList[0].leasingDate" />
			<el-table-column label="承运商" align="center" prop="itemList[0].carrier" />
			<!-- <el-table-column label="库存地点" align="center" prop="itemList[0].stageNo" /> -->
			<el-table-column label="库存地点" align="center" prop="itemList[0].stageName" />
			<el-table-column label="物料凭证" align="center" prop="itemList[0].materialSlipNo" />
			<el-table-column label="退工厂备注" align="center" prop="itemList[0].remark" />
			<el-table-column label="操作人" align="center" prop="itemList[0].createBy" />
			<el-table-column label="移动类型" align="center" prop="itemList[0].moveType" />
			<el-table-column label="销售订单号" align="center" prop="itemList[0].salesOrderNo" />
			<el-table-column label="销售订单创建日期" align="center" prop="itemList[0].salesDate" />
			<el-table-column label="销售订单行项" align="center" prop="itemList[0].salesOrderSingleLineItem" />
			<el-table-column label="销售订单类型" align="center" prop="itemList[0].salesOrderType" />
			<el-table-column label="计划入库日期" align="center" prop="itemList[0].planInBoundDate" />
			<el-table-column label="应入库日期" align="center" prop="itemList[0].shouldInDate" />
			<el-table-column label="首次入库日期" align="center" prop="itemList[0].firstInBoundDate" />
			<el-table-column label="实际入库日期" align="center" prop="itemList[0].receivedTime" />
			<el-table-column label="实际入库时间" align="center" prop="itemList[0].receiveHourTime" />
			<el-table-column label="生产车间" align="center" prop="itemList[0].manufactoryDept" />
			<el-table-column label="入库数量" align="center" prop="itemList[0].quantity" />
			<el-table-column label="品牌" align="center" prop="itemList[0].vehicleBrand" />
			<el-table-column label="子品牌" align="center" prop="itemList[0].subBrand" />
			<el-table-column label="产品线" align="center" prop="itemList[0].productionLine" />
			<el-table-column label="子产品线" align="center" prop="itemList[0].subProductionLine" />
			<el-table-column label="吨位" align="center" prop="itemList[0].weight" />
			<el-table-column label="车身状态" align="center" prop="itemList[0].productBodyStatus" />
			<el-table-column label="轴距" align="center" prop="itemList[0].wheelBase" />
			<el-table-column label="內编" align="center" prop="itemList[0].innerCode" />
			<el-table-column label="物料号" align="center" prop="itemList[0].materialNo" />
			<el-table-column label="16位物料号" align="center" prop="itemList[0].material16Code" />
			<el-table-column label="物料描述" align="center" prop="itemList[0].materialDesc" />
			<el-table-column label="公告号" align="center" prop="itemList[0].batchNoC" />
			<el-table-column label="销售组织" align="center" prop="itemList[0].salesOrgNo" />
			<el-table-column label="分销渠道" align="center" prop="itemList[0].salesDistributor" />
			<el-table-column label="销售大区" align="center" prop="itemList[0].salesRegion" />
			<el-table-column label="市场部" align="center" prop="itemList[0].salesMarketDept" />
			<el-table-column label="经销商代号" align="center" prop="itemList[0].consigneeNo" />
			<el-table-column label="经销商描述" align="center" prop="itemList[0].consigneeName" />
			<el-table-column label="驾驶室" align="center" prop="itemList[0].driverCabinDesc" />
			<el-table-column label="变速器型号" align="center" prop="itemList[0].transmission" />
			<el-table-column label="车型代号" align="center" prop="itemList[0].vehicleModel" />
			<el-table-column label="发动机号" align="center" prop="itemList[0].engineNo" />
			<el-table-column label="发动机型号" align="center" prop="itemList[0].engineModel" />
			<el-table-column label="DMS订单号" align="center" prop="itemList[0].dmsOrderNo" />
			<el-table-column label="生产日期" align="center" prop="itemList[0].produceDate" />
			<el-table-column label="订单原因" align="center" prop="itemList[0].orderReason" />
			<el-table-column label="采购定单号" align="center" prop="itemList[0].purchaseOrderNo" />
			<el-table-column label="是否批导" align="center" prop="itemList[0].batchProcessYn" />

			<!-- 新增字段 -->
			<el-table-column label="物流公司真实出库日期" align="center" prop="" />
			<el-table-column label="物流公司真实出库目的地" align="center" prop="" />


			<!-- <el-table-column label="库位" align="center" prop="itemList[0].locationNo" />
      <el-table-column label="品牌" align="center" prop="itemList[0].vehicleBrand" />
      <el-table-column label="车型" align="center" prop="itemList[0].vehicleModel" />
      <el-table-column label="仓库" align="center" prop="itemList[0].stageNo" />
      <el-table-column label="库区" align="center" prop="itemList[0].areaNo" />
      <el-table-column label="轿运装车类型" align="center" prop="itemList[0].vehicleLoadType" />
      <el-table-column label="长" align="center" prop="itemList[0].length" />
      <el-table-column label="宽" align="center" prop="itemList[0].width" />
      <el-table-column label="收货人名称" align="center" prop="itemList[0].consigneeName" />
      <el-table-column label="收货人电话" align="center" prop="itemList[0].consigneePhoneNo" />
      <el-table-column label="收货人城市" align="center" prop="itemList[0].destination" />
      <el-table-column label="收货人地址" align="center" prop="itemList[0].consigneeAddress" /> -->



			<el-table-column label="备注" align="center" prop="remark" />
			<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button  size="mini" type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">修改</el-button>
          <el-button  size="mini" type="text" icon="el-icon-delete" @click="handleRemove(scope.row)">删除</el-button>
        </template>
      </el-table-column> -->
		</el-table>

		<!-- 分页 -->
		<pagination v-show="page.total>0" :total="page.total" :page.sync="page.current" :limit.sync="page.pageSize"
			@pagination="handleQuery" />

		<!-- 添加/修改对话框 -->
		<el-dialog :title="newTbWmsMaterialDeliveryFormDialog.title"
			:visible.sync="newTbWmsMaterialDeliveryFormDialog.visible" :close-on-click-modal="false"
			:before-close="resetNewTbWmsMaterialDeliveryForm" width="600px" append-to-body top="6vh">
			<el-form ref="newTbWmsMaterialDeliveryForm1" :model="newTbWmsMaterialDeliveryFormData"
				:rules="newTbWmsMaterialDeliveryFormRules" label-width="135px ">
				<el-form-item label="希望到货时间:" prop="requestDeliveryTime">
					<el-date-picker v-model="newTbWmsMaterialDeliveryFormData.receitems[0].requestDeliveryTime"
						type="date" value-format="yyyy-MM-dd" placeholder="预定提货时间" clearable style="width:100%" />
				</el-form-item>
				<el-form-item label="预定提货时间:" prop="previousDepartTime">
					<el-date-picker v-model="newTbWmsMaterialDeliveryFormData.receitems[0].previousDepartTime"
						type="date" value-format="yyyy-MM-dd" placeholder="希望到货时间" clearable style="width:100%" />
				</el-form-item>
				<el-form-item label="是否要委改:" prop="isRemodel">
					<el-select v-model="newTbWmsMaterialDeliveryFormData.receitems[0].isRemodel"
						@change="(val) => selectChange(val,'isRemodel')" prop="isRemodel" placeholder="请选择" filterable
						clearable style="width: 100%;">
						<el-option v-for="option in ynOptions" :key="option.label" :label="option.label"
							:value="option.key" />
					</el-select>
				</el-form-item>
				<el-form-item label="是否属地委改:" prop="isLocalityRemodel" v-if="isHide">
					<el-select v-model="newTbWmsMaterialDeliveryFormData.receitems[0].isLocalityRemodel"
						@change="(val) => selectChange(val,'isLocalityRemodel')" prop="isLocalityRemodel"
						placeholder="请选择" filterable clearable style="width: 100%;">
						<el-option v-for="option in ynOptions" :key="option.label" :label="option.label"
							:value="option.key" />
					</el-select>
				</el-form-item>
				<el-form-item label="属地委改仓库:" prop="localityRemodel" v-if="isHide && isHide2">
					<el-select v-model="newTbWmsMaterialDeliveryFormData.receitems[0].localityRemodel"
						prop="localityRemodelWarehouse" placeholder="请选择" filterable clearable style="width: 100%;">
						<el-option v-for="option in warehouseDate" :key="option.warehouserName"
							:label="option.warehouserName" :value="option.id" />
					</el-select>
				</el-form-item>

				<el-form-item label="外地委改厂仓库:" prop="fieldRemodel" v-if="isHide && isHide3">
					<el-select v-model="newTbWmsMaterialDeliveryFormData.receitems[0].fieldRemodel"
						prop="fieldRemodelWarehouse" placeholder="请选择" filterable clearable style="width: 100%;">
						<el-option v-for="option in warehouseDate" :key="option.warehouserName"
							:label="option.warehouserName" :value="option.id" />
					</el-select>
				</el-form-item>

				<el-form-item label="是否中转:" prop="isTransfer">
					<el-select v-model="newTbWmsMaterialDeliveryFormData.receitems[0].isTransfer"
						@change="(val) => selectChange(val,'isTransfer')" prop="isTransfer" placeholder="请选择" filterable
						clearable style="width: 100%;">
						<el-option v-for="option in ynOptions" :key="option.label" :label="option.label"
							:value="option.key" />
					</el-select>
				</el-form-item>
				<el-form-item label="外地中转库:" prop="fieldTransfer" v-if="isHide4">
					<el-select v-model="newTbWmsMaterialDeliveryFormData.receitems[0].fieldTransfer"
						prop="fieldTransferWarehouse" placeholder="请选择" filterable clearable style="width: 100%;">
						<el-option v-for="option in warehouseDate" :key="option.warehouserName"
							:label="option.warehouserName" :value="option.id" />
					</el-select>
				</el-form-item>

				<el-form-item label="整车序列号(VIN码):" prop="vinNo">
					<el-input v-model="newTbWmsMaterialDeliveryFormData.receitems[0].vinNo" class="filter-item"
						placeholder="请输入VIN码" disabled>
						<i slot="suffix" class="el-input__icon el-icon-search" @click="openFromSelector" />
					</el-input>
					<TbWmsMaterialDeliveryNewSelector :visible.sync="fromSelectorVisible"
						@selected="handleFromSelected" />
				</el-form-item>
				<el-form-item label="车型:" prop="vehicleModel">
					<el-input v-model="newTbWmsMaterialDeliveryFormData.receitems[0].vehicleModel" placeholder="请输入车型"
						disabled />
				</el-form-item>
				<el-form-item label="品牌:" prop="vehicleBrand">
					<el-input v-model="newTbWmsMaterialDeliveryFormData.receitems[0].vehicleBrand" placeholder="请输入品牌"
						disabled />
				</el-form-item>
				<el-form-item label="入库单号:" prop="orderNo">
					<el-input v-model="newTbWmsMaterialDeliveryFormData.receitems[0].orderNo" placeholder="请输入入库单号"
						disabled />
				</el-form-item>

				<el-form-item label="收货人名称:" prop="consigneeName">
					<el-input v-model="newTbWmsMaterialDeliveryFormData.consigneeName" class="filter-item"
						placeholder="请输入收货人名称" disabled>
						<i slot="suffix" class="el-input__icon el-icon-search" @click="openFromSelector1" />
					</el-input>
					<TbWmsMaterialDeliveryConsigneeSelector :visible.sync="fromSelectorVisible1"
						@selected="handleFromSelected1" />
				</el-form-item>
				<el-form-item label="收货人手机号:" prop="consigneePhoneNo">
					<el-input v-model="newTbWmsMaterialDeliveryFormData.consigneePhoneNo" placeholder="请输入收货人手机号"
						disabled />
				</el-form-item>
				<el-form-item label="收货人城市:" prop="destination">
					<el-cascader style="width: 100%;"
						v-model="newTbWmsMaterialDeliveryFormData.receitems[0].destination" :options="locationList"
						:props="{ expandTrigger: 'hover', label: 'locationName', value: 'id' }" filterable
						@change="handleLocationChange" disabled />
					<!-- @change="handleLocationChange" -->
				</el-form-item>
				<el-form-item label="收货人地址:" prop="consigneeAddress">
					<el-input v-model="newTbWmsMaterialDeliveryFormData.receitems[0].consigneeAddress"
						placeholder="请输入收货人地址" disabled />
				</el-form-item>

				<el-form-item label="运输方式:" prop="transportType">
					<el-select v-model="newTbWmsMaterialDeliveryFormData.receitems[0].transportType"
						prop="transportType" placeholder="请选择" filterable clearable style="width: 100%;">
						<el-option v-for="option in transportTypeList" :key="option.label" :label="option.label"
							:value="option.key" />
					</el-select>
				</el-form-item>
				<el-form-item label="备注:" prop="remark">
					<el-input v-model="newTbWmsMaterialDeliveryFormData.remark" type="textarea" placeholder="请输入备注" />
				</el-form-item>
			</el-form>

			<div slot="footer" class="dialog-footer">
				<el-button type="primary" @click="confirmNewTbWmsMaterialDeliveryFormDialog">确 定</el-button>
				<el-button @click="resetNewTbWmsMaterialDeliveryForm">取 消</el-button>
			</div>
		</el-dialog>




		<!-- 添加/修改对话框 -->
		<el-dialog :title="newTbWmsMaterialDeliveryFormDialog2.title"
			:visible.sync="newTbWmsMaterialDeliveryFormDialog2.visible" :close-on-click-modal="false"
			:before-close="resetNewTbWmsMaterialDeliveryForm2" width="600px" append-to-body top="6vh">
			<el-form ref="newTbWmsMaterialDeliveryForm2" :model="newTbWmsMaterialDeliveryFormData"
				:rules="newTbWmsMaterialDeliveryFormRules" label-width="135px ">
				<!-- <el-form-item label="预定提货时间:" prop="requestDeliveryTime">
					<el-date-picker v-model="newTbWmsMaterialDeliveryFormData.receitems[0].requestDeliveryTime"
						type="date" value-format="yyyy-MM-dd" placeholder="预定提货时间" clearable style="width:100%" />
				</el-form-item>
				<el-form-item label="希望到货时间:" prop="previousDepartTime">
					<el-date-picker v-model="newTbWmsMaterialDeliveryFormData.receitems[0].previousDepartTime"
						type="date" value-format="yyyy-MM-dd" placeholder="希望到货时间" clearable style="width:100%" />
				</el-form-item>
				<el-form-item label="是否要委改:" prop="isRemodel">
					<el-select v-model="newTbWmsMaterialDeliveryFormData.receitems[0].isRemodel"
						@change="(val) => selectChange(val,'isRemodel')" prop="isRemodel" placeholder="请选择" filterable
						clearable style="width: 100%;">
						<el-option v-for="option in ynOptions" :key="option.label" :label="option.label"
							:value="option.key" />
					</el-select>
				</el-form-item>
				<el-form-item label="是否属地委改:" prop="isLocalityRemodel" v-if="isHide">
					<el-select v-model="newTbWmsMaterialDeliveryFormData.receitems[0].isLocalityRemodel"
						@change="(val) => selectChange(val,'isLocalityRemodel')" prop="isLocalityRemodel"
						placeholder="请选择" filterable clearable style="width: 100%;">
						<el-option v-for="option in ynOptions" :key="option.label" :label="option.label"
							:value="option.key" />
					</el-select>
				</el-form-item>
				<el-form-item label="属地委改仓库:" prop="localityRemodel" v-if="isHide && isHide2">
					<el-select v-model="newTbWmsMaterialDeliveryFormData.receitems[0].localityRemodel"
						prop="localityRemodelWarehouse" placeholder="请选择" filterable clearable style="width: 100%;">
						<el-option v-for="option in warehouseDate" :key="option.warehouserName"
							:label="option.warehouserName" :value="option.id" />
					</el-select>
				</el-form-item>

				<el-form-item label="外地委改厂仓库:" prop="fieldRemodel" v-if="isHide && isHide3">
					<el-select v-model="newTbWmsMaterialDeliveryFormData.receitems[0].fieldRemodel"
						prop="fieldRemodelWarehouse" placeholder="请选择" filterable clearable style="width: 100%;">
						<el-option v-for="option in otherwarehouseDate" :key="option.warehouserName"
							:label="option.warehouserName" :value="option.id" />
					</el-select>
				</el-form-item>

				<el-form-item label="是否中转:" prop="isTransfer">
					<el-select v-model="newTbWmsMaterialDeliveryFormData.receitems[0].isTransfer"
						@change="(val) => selectChange(val,'isTransfer')" prop="isTransfer" placeholder="请选择" filterable
						clearable style="width: 100%;">
						<el-option v-for="option in ynOptions" :key="option.label" :label="option.label"
							:value="option.key" />
					</el-select>
				</el-form-item>
				<el-form-item label="外地中转库:" prop="fieldTransfer" v-if="isHide4">
					<el-select v-model="newTbWmsMaterialDeliveryFormData.receitems[0].fieldTransfer"
						prop="fieldTransferWarehouse" placeholder="请选择" filterable clearable style="width: 100%;">
						<el-option v-for="option in transitWarehouseData" :key="option.warehouserName"
							:label="option.warehouserName" :value="option.id" />
					</el-select>
				</el-form-item> -->

				<!-- <el-form-item label="整车序列号(VIN码):" prop="vinNo">
            <el-input v-model="newTbWmsMaterialDeliveryFormData.receitems[0].vinNo" class="filter-item" placeholder="请输入VIN码" disabled>
              <i slot="suffix" class="el-input__icon el-icon-search" @click="openFromSelector" />
            </el-input>
            <TbWmsMaterialDeliveryNewSelector :visible.sync="fromSelectorVisible" @selected="handleFromSelected" />
          </el-form-item>
          <el-form-item label="车型:" prop="vehicleModel">
            <el-input v-model="newTbWmsMaterialDeliveryFormData.receitems[0].vehicleModel" placeholder="请输入车型"  disabled/>
          </el-form-item>
          <el-form-item label="品牌:" prop="vehicleBrand">
            <el-input v-model="newTbWmsMaterialDeliveryFormData.receitems[0].vehicleBrand" placeholder="请输入品牌"  disabled/>
          </el-form-item>
          <el-form-item label="入库单号:" prop="orderNo">
            <el-input v-model="newTbWmsMaterialDeliveryFormData.receitems[0].orderNo" placeholder="请输入入库单号"  disabled/>
          </el-form-item> -->

				<!-- <el-form-item v-if="isHide5" label="收货人名称:" prop="consigneeName">
					<el-input v-model="newTbWmsMaterialDeliveryFormData.consigneeName" class="filter-item"
						placeholder="请输入收货人名称" disabled>
						<i slot="suffix" class="el-input__icon el-icon-search" @click="openFromSelector1" />
					</el-input>
					<TbWmsMaterialDeliveryConsigneeSelector :visible.sync="fromSelectorVisible1"
						@selected="handleFromSelected1" />
				</el-form-item>
				<el-form-item v-if="isHide5" label="收货人手机号:" prop="consigneePhoneNo">
					<el-input v-model="newTbWmsMaterialDeliveryFormData.consigneePhoneNo" placeholder="请输入收货人手机号"
						disabled />
				</el-form-item>
				<el-form-item v-if="isHide5" label="收货人城市:" prop="destination">
					<el-cascader style="width: 100%;"
						v-model="newTbWmsMaterialDeliveryFormData.receitems[0].destination" :options="locationList"
						:props="{ expandTrigger: 'hover', label: 'locationName', value: 'id' }" filterable
						@change="handleLocationChange" disabled />
				</el-form-item>
				<el-form-item v-if="isHide5" label="收货人地址:" prop="consigneeAddress">
					<el-input v-model="newTbWmsMaterialDeliveryFormData.receitems[0].consigneeAddress"
						placeholder="请输入收货人地址" disabled />
				</el-form-item>

				<el-form-item label="运输方式:" prop="transportType">
					<el-select v-model="newTbWmsMaterialDeliveryFormData.receitems[0].transportType"
						prop="transportType" placeholder="请选择" filterable clearable style="width: 100%;">
						<el-option v-for="option in transportTypeList" :key="option.label" :label="option.label"
							:value="option.key" />
					</el-select>
				</el-form-item> -->

				<el-form-item label="出库类型:" prop="departType">
					<el-input v-model="newTbWmsMaterialDeliveryFormData.departType" type="textarea" placeholder="请输入出库类型" />
				</el-form-item>
        <el-form-item label="备注:" prop="remark">
					<el-input v-model="newTbWmsMaterialDeliveryFormData.remark" type="textarea" placeholder="请输入备注" />
				</el-form-item>
			</el-form>

			<div slot="footer" class="dialog-footer">
				<el-button type="primary" @click="confirmNewTbWmsMaterialDeliveryFormDialog2">确 定</el-button>
				<el-button @click="resetNewTbWmsMaterialDeliveryForm2">取 消</el-button>
			</div>
		</el-dialog>

		<!-- 导入对话框 -->
		<el-dialog :title="uploadDialog.title" :visible.sync="uploadDialog.visible" width="400px" append-to-body>
			<div v-loading="uploadLoading">
				<el-upload ref="upload" :limit="1" :headers="uploadData.headers" :action="uploadData.url"
					:data="uploadData.params" :disabled="uploadData.isUploading" :on-progress="handleFileUploadProgress"
					:on-success="handleFileSuccess" :on-error="handleFileError" :auto-upload="false"
					accept=".xlsx, .xls" drag>
					<i class="el-icon-upload" />
					<div class="el-upload__text">
						将文件拖到此处，或
						<em>点击上传</em>
					</div>
					<div slot="tip" class="el-upload__tip">
						<!-- <el-link type="info" style="font-size:12px" @click="handleDownloadTemplate">下载模板</el-link> -->
					</div>
					<div slot="tip" class="el-upload__tip" style="color:red">提示：仅允许导入“xls”或“xlsx”格式文件！</div>
				</el-upload>
				<div slot="footer" class="dialog-footer" align="center">
					<el-button type="primary" @click="confirmUploadDialog">确 定</el-button>
					<el-button @click="resetUploadDialog">取 消</el-button>
				</div>
			</div>
		</el-dialog>


		<!-- 导入对话框 -->
		<el-dialog :title="uploadDialog1.title" :visible.sync="uploadDialog1.visible" width="400px" append-to-body>
			<div v-loading="uploadLoading1">
				<el-upload ref="upload" :limit="1" :headers="uploadData1.headers" :action="uploadData1.url"
					:data="uploadData1.params" :disabled="uploadData1.isUploading"
					:on-progress="handleFileUploadProgress1" :on-success="handleFileSuccess1"
					:on-error="handleFileError1" :auto-upload="false" accept=".xlsx, .xls" drag>
					<i class="el-icon-upload" />
					<div class="el-upload__text">
						将文件拖到此处，或
						<em>点击上传</em>
					</div>
					<div slot="tip" class="el-upload__tip">
						<!-- <el-link type="info" style="font-size:12px" @click="handleDownloadTemplate">下载模板</el-link> -->
					</div>
					<div slot="tip" class="el-upload__tip" style="color:red">提示：仅允许导入“xls”或“xlsx”格式文件！</div>
				</el-upload>
				<div slot="footer" class="dialog-footer" align="center">
					<el-button type="primary" @click="confirmUploadDialog1">确 定</el-button>
					<el-button @click="resetUploadDialog1">取 消</el-button>
				</div>
			</div>
		</el-dialog>

	</div>
</template>

<script>
	import TbWmsMaterialDeliveryApi from '@/api/web/TbWmsMaterialDeliveryApi'
	import TbWmsMaterialDeliveryLineApi from '@/api/web/TbWmsMaterialDeliveryLineApi'
	import TbWmsMaterialReceiptApi from '@/api/web/TbWmsMaterialReceiptApi'
	import TbWmsMaterialReceiptLineApi from '@/api/web/TbWmsMaterialReceiptLineApi'
	import TbWmsMaterialInLocationApi from '@/api/web/TbWmsMaterialInLocationApi'
	import WarehouseApi from '@/api/basic/WarehouseApi'
	import WarehouseAreaApi from '@/api/web/WarehouseAreaApi'
	import LocationApi from '@/api/basic/LocationApi'
	import TreeUtils from '@/utils/TreeUtils'
	import AuthUtils from '@/utils/AuthUtils'
	import TbWmsMaterialDeliveryNewSelector from '@/views/web/tbWmsMaterialDelivery/TbWmsMaterialDeliveryNewSelector'
	import TbWmsMaterialDeliveryConsigneeSelector from '@/views/web/tbWmsMaterialDelivery/TbWmsMaterialDeliveryConsigneeSelector'

	const defaultNewTbWmsMaterialDeliveryFormData = {
		consignmentLocation: null,
		orderNo: null, //收货单号
		sourceOrderNo: null, //OMS号
		customerNo: '1000', //客户代码
		customerName: null,
		receiptNo: null, //客户单号
		orderTime: null, //订单日期
		preArrivedTime: null, //预计收货日期
		orderType: "", //订单类型
		warehouseCode: null, //发运地代码
		shipperAddress: null, //地址
		shipperPhoneNo: null, //电话
		shipperContact: null, //联系人
		orderHandlingType: null, //订单处理类型
		warehouse: null,
		departType: null, //出库类型
		remark: null, //备注
		departureIdList: [],
		consigneeName: null,
		consigneePhoneNo: null,
		consignee: null, //收货人
		receitems: [{
			skuCode: null, //图号
			spec: null, //货物规格
			materialName: null,
			materialNo: null,
			measUnitNo: null,
			stageNo: null,
			areaNo: null,
			locationNo: null,
			shipByPackOrqty: null,
			arrivedQty: null,
			qtyPerPack: null,
			quantity: null,
			status: null,
			packQty: null,
			weight: null,
			volume: null,
			countCarriage: null,
			cargoValue: null,
			weightMeasUnit: null,
			packing: null,
			unitPrice: null,
			unitVolume: null,
			unitWeight: null,
			countPrice: null,
			length: null,
			width: null,
			high: null,
			vehicleBrand: null,
			vehicleModel: null,
			vinNo: null,
			orderNo: null,
			receivedLineId: null,
			deliveryType: 'vehicle',
			requestDeliveryTime: null,
			previousDepartTime: null,
			accessaryDeliveryYn: '1',
			isRemodel: null,
			isLocalityRemodel: null,
			localityRemodel: null,
			fieldRemodel: null,
			isTransfer: null,
			fieldTransfer: null,
			transportType: null,
			destination: null,
			consigneeAddress: null
			// shipByPackOrqty: null, //结算依据
			// quantity: null, //数量
			// materialName: null, //货物名称
			// materialNo: null,
			// unitPrice: null, //货物单价
			// weightMeasUnit: null, //重量单位
			// unitWeight: null, //重量
			// weight: null, //总重
			// cargoValue: null, //价值
			// countPrice: null, //结算单价
			// countQuantity: null, //结算数量
			// countCarriage: null, //仓储总费
			// status: '', //状态
			// allocated: '', //已分配
			// orderPick: '', //已拣货
			// forwarding: '', //已发运
			// stockout: '' //预缺货数
		}]
	}


	export default {
		name: 'TbWmsMaterialDeliveryNew',
		components: {
			TbWmsMaterialDeliveryNewSelector,
			TbWmsMaterialDeliveryConsigneeSelector
		},
		data() {
			return {
				vinNos1: null,
				queryParams: {
					vinNos: null,
					warehouseCode: null,
					isValid: '1'
				},
				options: {

					warehouseCodes: []
				},
				page: {
					current: 1,
					pageSize: 10,
					total: 0,
					records: []
				},
				uploadLoading: false,
				uploadLoading1: false,
				locationList: [],
				polygonPath: [],
				newTbWmsMaterialDeliveryFormDialog: {
					title: '',
					visible: false
				},
				newTbWmsMaterialDeliveryFormDialog2: {
					title: '',
					visible: false
				},
				newTbWmsMaterialDeliveryFormData: Object.assign({}, defaultNewTbWmsMaterialDeliveryFormData),
				newTbWmsMaterialDeliveryFormRules: {},
				newTbWmsMaterialDeliveryFormDataList: [],
				loading: true,
				searchVisible: true,
				multipleSelection: [],
				isSingle: true,
				isMultiple: true,
				warehouseDate: [],
				otherwarehouseDate: [],
				transitWarehouseData: [],
				warehouseAreaDate: [],
				locationDate: [],
				isLocationNo: false,
				vehicleLoadTypeList: this.$constant.vehicleLoadTypeList,
				ynOptions: this.$constant.ynOptions,
				transportTypeList: this.$constant.transportTypeList,
				isHide: false,
				isHide2: false,
				isHide3: false,
				isHide4: false,
				fromSelectorVisible: false,
				fromSelectorVisible1: false,
				isHide5: false,
				brandList: [{
					text: '时代领航',
					value: '1'
				}],
				vehicleTypeList: [{
						text: '领航M5',
						value: '1'
					},
					{
						text: '时代领航H',
						value: '2'
					}
				],
				uploadDialog: {
					title: '出库导入',
					visible: false
				},
				uploadData: {
					headers: {
						Authorization: 'Bearer ' + AuthUtils.getToken()
					}, // 上传请求头
					url: process.env.VUE_APP_BASE_API + '/web/tbWmsMaterialDeliveryLine/importData1', // 上传的地址
					params: {},
					isUploading: false, // 是否禁用上传
					updateSupport: 0 // 是否更新已经存在的数据
				},
				uploadDialog1: {
					title: '导入承运商',
					visible: false
				},
				uploadData1: {
					headers: {
						Authorization: 'Bearer ' + AuthUtils.getToken()
					}, // 上传请求头
					url: process.env.VUE_APP_BASE_API + '/tms/tFoFreightOrderItem/importData1', // 上传的地址
					params: {},
					isUploading: false, // 是否禁用上传
					updateSupport: 0 // 是否更新已经存在的数据
				}
			}
		},
		created() {
			this.handleQuery()
			this.loadOptions()
		},
		methods: {
			loadOptions() {
				LocationApi.list().then(response => {
					this.locationList = TreeUtils.list2Tree(response.data)
				})
				WarehouseApi.list({
					warehouseType: 'otherRemodel'
				}).then(res => {
					this.otherwarehouseDate = res.data
				})
				WarehouseApi.list().then(res => {
					this.options.warehouseCodes = res.data
				})
				WarehouseApi.list({
					warehouseType: 'transit'
				}).then(res => {
					this.transitWarehouseData = res.data
				})
			},
			handleAdd() {
				this.openNewTbWmsMaterialDeliveryFormDialog()
			},
			batch() {
				if (this.multipleSelection.length <= 0) {
					this.$message.error('请勾选信息')
				} else {
					this.newTbWmsMaterialDeliveryFormDataList = []

					for (let i in this.multipleSelection) {
						if (this.multipleSelection[i].itemList[0].consigneeNo == null) {
							this.isHide5 = true
						}

						this.newTbWmsMaterialDeliveryFormData.receitems[0].receivedLineId = this.multipleSelection[i]
							.itemList[0].id
						this.newTbWmsMaterialDeliveryFormData.receitems[0].orderNo = this.multipleSelection[i].orderNo
						this.newTbWmsMaterialDeliveryFormData.receitems[0].vinNo = this.multipleSelection[i].itemList[0]
							.vinNo
						this.newTbWmsMaterialDeliveryFormData.receitems[0].vehicleBrand = this.multipleSelection[i]
							.itemList[0].vehicleBrand
						this.newTbWmsMaterialDeliveryFormData.receitems[0].vehicleModel = this.multipleSelection[i]
							.itemList[0].vehicleModel
						this.newTbWmsMaterialDeliveryFormData.warehouseCode = this.multipleSelection[i].itemList[0].stageNo


						this.newTbWmsMaterialDeliveryFormData.consignee = this.multipleSelection[i].itemList[0].consigneeNo
						this.newTbWmsMaterialDeliveryFormData.consigneeName = this.multipleSelection[i].itemList[0]
							.consigneeName
						this.newTbWmsMaterialDeliveryFormData.consigneePhoneNo = this.multipleSelection[i].itemList[0]
							.consigneePhoneNo
						this.newTbWmsMaterialDeliveryFormData.receitems[0].consigneeAddress = this.multipleSelection[i]
							.itemList[0].consigneeAddress
						this.newTbWmsMaterialDeliveryFormData.receitems[0].destination = this.multipleSelection[i]
							.itemList[0].destination

						this.newTbWmsMaterialDeliveryFormDataList.push(JSON.parse(JSON.stringify(this
							.newTbWmsMaterialDeliveryFormData)))
					}


					console.log(this.newTbWmsMaterialDeliveryFormDataList)
					this.openNewTbWmsMaterialDeliveryFormDialog2()
				}

			},
			handleRemove(row) {
				const ids = row.id || this.multipleSelection.map(item => item.id)
				const itemListId = row.itemList[0].id
				this.$confirm('是否确认删除数据?', '警告', {
					confirmButtonText: '确定',
					cancelButtonText: '取消',
					type: 'warning'
				}).then(function() {
					TbWmsMaterialDeliveryLineApi.remove(itemListId)
					return TbWmsMaterialDeliveryApi.remove(ids)
				}).then(() => {
					this.handleQuery()
					this.$message.success('删除成功')
				})
			},
			handleEdit(row) {
				const id = row.id || this.multipleSelection.map(item => item.id)[0]
				this.openNewTbWmsMaterialDeliveryFormDialog(id)
			},
			handleQuery() {
				this.loading = true
				this.queryParams.status = "created"
				// this.queryParams.carrierNo = 'isNotNull'
				if (this.vinNos1 && this.queryParams.vinNos == null) {
					this.queryParams.vinNos = this.vinNos1.replace(/[；,，;\s\r\n]+/g, ",").split(",");
				} else {
					this.queryParams.vinNos = null
				}
				TbWmsMaterialReceiptApi.page(this.queryParams, this.page).then(response => {
					console.log(response)
					this.page.records = response.data.records
					this.page.total = response.data.total
					this.loading = false
				}, () => {
					this.loading = false
				})

				WarehouseApi.list({
					warehouseType: 'remodel'
				}).then(res => {
					this.warehouseDate = res.data
				})
			},
			handleExport() {
				this.$confirm('是否确认导出数据?', '警告', {
					confirmButtonText: '确定',
					cancelButtonText: '取消',
					type: 'warning'
				}).then(function() {
					//return MapFenceApi.exportData(this.queryParams)
				}).then(response => {
					this.$common.download(response.msg)
				})
			},
			openNewTbWmsMaterialDeliveryFormDialog(id) {
				this.newTbWmsMaterialDeliveryFormDialog.visible = true
				if (id) {
					this.newTbWmsMaterialDeliveryFormDialog.title = '新出库计划-修改'
					TbWmsMaterialDeliveryApi.get(id).then(response => {
						if (response.data.receitems[0].destination != null) {
							let str = response.data.receitems[0].destination.split(",")

							response.data.receitems[0].destination = str
						}


						this.newTbWmsMaterialDeliveryFormData = {
							...this.newTbWmsMaterialDeliveryFormData,
							...response.data
						}
					})

				} else {
					this.newTbWmsMaterialDeliveryFormDialog.title = '新出库计划-添加'
				}
			},

			openNewTbWmsMaterialDeliveryFormDialog2(id) {
				this.newTbWmsMaterialDeliveryFormDialog2.visible = true
				if (id) {
					this.newTbWmsMaterialDeliveryFormDialog.title = '新出库计划-修改'
					TbWmsMaterialDeliveryApi.get(id).then(response => {
						if (response.data.receitems[0].destination != null) {
							let str = response.data.receitems[0].destination.split(",")

							response.data.receitems[0].destination = str
						}


						this.newTbWmsMaterialDeliveryFormData = {
							...this.newTbWmsMaterialDeliveryFormData,
							...response.data
						}
					})

				} else {
					this.newTbWmsMaterialDeliveryFormDialog2.title = '批量出库'
				}
			},
			confirmNewTbWmsMaterialDeliveryFormDialog() {
				this.$refs['newTbWmsMaterialDeliveryForm1'].validate(valid => {
					if (valid) {
						this.handleLocationChange(this.newTbWmsMaterialDeliveryFormData.receitems[0].destination)

						if (this.newTbWmsMaterialDeliveryFormData.id) {
							TbWmsMaterialDeliveryApi.updataNewVehicleReceipt(this.newTbWmsMaterialDeliveryFormData)
								.then(response => {
									this.$message.success('修改成功')
									this.resetNewTbWmsMaterialDeliveryForm()
									this.handleQuery()
								})
						} else {

							console.log(this.newTbWmsMaterialDeliveryFormData)
							TbWmsMaterialDeliveryApi.insertAll(this.newTbWmsMaterialDeliveryFormData).then(
								response => {
									this.$message.success('添加成功')
									this.resetNewTbWmsMaterialDeliveryForm()
									this.handleQuery()
								})
						}
					}
				})
			},

			confirmNewTbWmsMaterialDeliveryFormDialog2() {
        console.log(this.newTbWmsMaterialDeliveryFormData);
				// this.$refs['newTbWmsMaterialDeliveryForm2'].validate(valid => {
				// 	if (valid) {
				// 		console.log(this.newTbWmsMaterialDeliveryFormData)

				// 		for (let i in this.newTbWmsMaterialDeliveryFormDataList) {
				// 			this.newTbWmsMaterialDeliveryFormDataList[i].receitems[0].requestDeliveryTime = this
				// 				.newTbWmsMaterialDeliveryFormData.receitems[0].requestDeliveryTime
				// 			this.newTbWmsMaterialDeliveryFormDataList[i].receitems[0].isRemodel = this
				// 				.newTbWmsMaterialDeliveryFormData.receitems[0].isRemodel
				// 			this.newTbWmsMaterialDeliveryFormDataList[i].receitems[0].isLocalityRemodel = this
				// 				.newTbWmsMaterialDeliveryFormData.receitems[0].isLocalityRemodel
				// 			this.newTbWmsMaterialDeliveryFormDataList[i].receitems[0].localityRemodel = this
				// 				.newTbWmsMaterialDeliveryFormData.receitems[0].localityRemodel
				// 			this.newTbWmsMaterialDeliveryFormDataList[i].receitems[0].fieldRemodel = this
				// 				.newTbWmsMaterialDeliveryFormData.receitems[0].fieldRemodel
				// 			this.newTbWmsMaterialDeliveryFormDataList[i].receitems[0].isTransfer = this
				// 				.newTbWmsMaterialDeliveryFormData.receitems[0].isTransfer
				// 			this.newTbWmsMaterialDeliveryFormDataList[i].receitems[0].fieldTransfer = this
				// 				.newTbWmsMaterialDeliveryFormData.receitems[0].fieldTransfer
				// 			this.newTbWmsMaterialDeliveryFormDataList[i].receitems[0].transportType = this
				// 				.newTbWmsMaterialDeliveryFormData.receitems[0].transportType
				// 			this.newTbWmsMaterialDeliveryFormDataList[i].remark = this
				// 				.newTbWmsMaterialDeliveryFormData.remark
				// 			if (this.isHide5) {
				// 				this.newTbWmsMaterialDeliveryFormDataList[i].consigneeName = this
				// 					.newTbWmsMaterialDeliveryFormData.consigneeName
				// 				this.newTbWmsMaterialDeliveryFormDataList[i].consigneePhoneNo = this
				// 					.newTbWmsMaterialDeliveryFormData.consigneePhoneNo
				// 				this.handleLocationChange(this.newTbWmsMaterialDeliveryFormData.receitems[0]
				// 					.destination)
				// 				this.newTbWmsMaterialDeliveryFormDataList[i].receitems[0].destination = this
				// 					.newTbWmsMaterialDeliveryFormData.receitems[0].destination
				// 				this.newTbWmsMaterialDeliveryFormDataList[i].receitems[0].consigneeAddress = this
				// 					.newTbWmsMaterialDeliveryFormData.receitems[0].consigneeAddress
				// 			}

				// 		}

				// 		console.log(JSON.parse(JSON.stringify(this.newTbWmsMaterialDeliveryFormDataList)))

				// 		TbWmsMaterialDeliveryApi.insertAllList(this.newTbWmsMaterialDeliveryFormDataList).then(
				// 			response => {
				// 				this.$message.success('添加成功')
				// 				this.resetNewTbWmsMaterialDeliveryForm2()
				// 				this.handleQuery()
				// 			})
				// 	}
				// })
			},
			resetNewTbWmsMaterialDeliveryForm() {
				this.newTbWmsMaterialDeliveryFormDialog = {
					title: '',
					visible: false
				}
				this.newTbWmsMaterialDeliveryFormData = Object.assign({}, defaultNewTbWmsMaterialDeliveryFormData)
				this.resetForm('newTbWmsMaterialDeliveryForm1')
			},
			resetNewTbWmsMaterialDeliveryForm2() {
				this.newTbWmsMaterialDeliveryFormDialog2 = {
					title: '',
					visible: false
				}
				this.newTbWmsMaterialDeliveryFormData = Object.assign({}, defaultNewTbWmsMaterialDeliveryFormData)
				this.resetForm('newTbWmsMaterialDeliveryForm2')
			},
			handleFromSelected(val) {
				this.newTbWmsMaterialDeliveryFormData.receitems[0].receivedLineId = val.itemList[0].id
				this.newTbWmsMaterialDeliveryFormData.receitems[0].orderNo = val.orderNo
				this.newTbWmsMaterialDeliveryFormData.receitems[0].vinNo = val.itemList[0].vinNo
				this.newTbWmsMaterialDeliveryFormData.receitems[0].vehicleBrand = val.itemList[0].vehicleBrand
				this.newTbWmsMaterialDeliveryFormData.receitems[0].vehicleModel = val.itemList[0].vehicleModel
				this.newTbWmsMaterialDeliveryFormData.warehouseCode = val.itemList[0].stageNo


				this.newTbWmsMaterialDeliveryFormData.consignee = val.itemList[0].consigneeNo
				this.newTbWmsMaterialDeliveryFormData.consigneeName = val.itemList[0].consigneeName
				this.newTbWmsMaterialDeliveryFormData.consigneePhoneNo = val.itemList[0].consigneePhoneNo
				this.newTbWmsMaterialDeliveryFormData.receitems[0].consigneeAddress = val.itemList[0].consigneeAddress

				if (val.itemList[0].destination != null) {
					this.newTbWmsMaterialDeliveryFormData.receitems[0].destination = val.itemList[0].destination.split(",")
				}


				//this.selectVehicleBrand(this.baseFormData.receitems[0].vehicleBrand)


			},
			handleFromSelected1(obj) {
				console.log(obj)
				this.newTbWmsMaterialDeliveryFormData.consignee = obj.id
				this.newTbWmsMaterialDeliveryFormData.consigneeName = obj.consigneeName
				this.newTbWmsMaterialDeliveryFormData.consigneePhoneNo = obj.linkManMobile
				this.newTbWmsMaterialDeliveryFormData.receitems[0].destination = obj.aeraDesc.split(",")
				this.newTbWmsMaterialDeliveryFormData.receitems[0].consigneeAddress = obj.deliveryAddress
			},
			handleSelectionChange(selection) {
				this.multipleSelection = selection
				this.isSingle = selection.length !== 1
				this.isMultiple = !selection.length
			},
			updatePolygonPath(e) {
				this.polygonPath = e.target.getPath()
			},
			openFromSelector() {
				this.fromSelectorVisible = true
			},
			openFromSelector1() {
				this.fromSelectorVisible1 = true
			},
			selectChange(e, v) {
				if (v == 'isRemodel' && e == 1) {
					this.isHide = true
				}
				if (v == 'isRemodel' && e == 0) {
					this.isHide = false
				}
				if (v == 'isLocalityRemodel' && e == 1) {
					this.isHide2 = true
					this.isHide3 = false
				}
				if (v == 'isLocalityRemodel' && e == 0) {
					this.isHide2 = false
					this.isHide3 = true
				}

				if (v == 'isTransfer' && e == 1) {
					this.isHide4 = true
				}
				if (v == 'isTransfer' && e == 0) {
					this.isHide4 = false
				}

			},
			handleLocationChange(val) {
				let str = ""
				for (let i in val) {
					if (i == 0) {
						str += val[i]
					} else {
						str += "," + val[i]
					}
				}
				this.newTbWmsMaterialDeliveryFormData.receitems[0].destination = str
			},

			// 文件上传中处理
			handleFileUploadProgress(event, file, fileList) {
				this.uploadData.isUploading = true
			},
			// 文件上传成功处理
			handleFileSuccess(response, file, fileList) {
				this.uploadLoading = false
				this.uploadDialog.visible = false
				this.uploadData.isUploading = false
				this.$refs.upload.clearFiles()
				this.$alert(response.data ? response.data : response.msg, '导入结果', {
					dangerouslyUseHTMLString: true
				})
				this.handleQuery()
			},
			// 文件上传失败处理
			handleFileError(response, file, fileList) {
				this.uploadLoading = false
			},
			openUploadDialog() {
        if(this.page.records.length<=0){
          this.$message.error('入库单还未绑定承运商')
        }else{
          this.resetUploadDialog()
          this.uploadDialog.visible = true
        }

			},
			confirmUploadDialog() {
				this.uploadLoading = true
				this.$refs.upload.submit()
			},
			resetUploadDialog() {
				this.uploadDialog.visible = false
			},

			// 文件上传中处理
			handleFileUploadProgress1(event, file, fileList) {
				this.uploadData.isUploading = true
			},
			// 文件上传成功处理
			handleFileSuccess1(response, file, fileList) {
				this.uploadDialog1.visible = false
				this.uploadData1.isUploading = false
				this.$refs.upload.clearFiles()
				this.$alert(response.data ? response.data : response.msg, '导入结果', {
					dangerouslyUseHTMLString: true
				})
				this.handleQuery()
			},
			openUploadDialog1() {
				this.resetUploadDialog1()
				this.uploadDialog1.visible = true
			},
			confirmUploadDialog1() {
				this.$refs.upload.submit()
			},
			resetUploadDialog1() {
				this.uploadDialog1.visible = false
			},
			handleFileError1() {

			},
			resetQuery() {
				this.page.current = 1
				this.resetForm('queryForm')
				this.handleQuery()
			}
		}
	}
</script>
<style lang="scss" scoped>
	.operation_container {
		margin-top: -16px;

		// 操作按钮
		ul {
			li {
				float: right;
				list-style: none;
				padding-right: 2px;
			}
		}
	}
</style>
